package tech.aistar.corejava.day05;

/**
 * Created by 李雨昂 on 2019/7/19.
 */
public class ToStringDemo {
    public static void main(String[] args) {
        Student s = new Student(10,"tom");
        System.out.println(s);//tech.aistar.corejava.day05.Student@28d93b30
        System.out.println(s.toString());//tech.aistar.corejava.day05.Student@28d93b30

        System.out.println(s.getClass().getName()+"@"+Integer.toHexString(s.hashCode()));

        String str = new String("hello");
        System.out.println("str = " + str);
        System.out.println(str.toString());
    }
}
